﻿<%@ Page Language="C#" MasterPageFile="~/grid.master" AutoEventWireup="true" CodeFile="HugeDataPager.aspx.cs" Inherits="Common_HugeDataPager" %>

<%@ Register Assembly="DevExpress.Xpo.v8.3, Version=8.3.2.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073"
    Namespace="DevExpress.Xpo" TagPrefix="dxxpo" %>
<%@ Register Assembly="DevExpress.Web.ASPxTreeList.v8.3, Version=8.3.2.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073"
    Namespace="DevExpress.Web.ASPxTreeList" TagPrefix="dxwtl" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.3.Export, Version=8.3.2.0, Culture=neutral, PublicKeyToken=5377C8E3B72B4073"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.v8.3, Version=8.3.2.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073"
    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dxcp" %>
<%@ Register Assembly="DevExpress.Web.v8.3, Version=8.3.2.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dxp" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.3, Version=8.3.2.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.3, Version=8.3.2.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
   <%@ Register Src="../UseControl/PageCommon.ascx" TagName="PageCommon" TagPrefix="uc1" %>


<asp:Content ID="Content2" ContentPlaceHolderID="C2" runat="Server">
    <dxcp:ASPxCallbackPanel ID="ajaxPanel" ClientInstanceName="ajaxPanel"
        LoadingPanelText="数据加载中…" OnCallback="ajaxPanel_Callback" runat="server" HideContentOnCallback="False">
        <PanelCollection>
            <dxp:PanelContent runat="server">
                <div>
                    <table>
                        <tr>
                            <td style="white-space: nowrap;">
                                <dxe:ASPxLabel ID="ASPxLabel1" runat="server" Text="数据区间:">
                                </dxe:ASPxLabel>
                            </td>
                            <td style="white-space: nowrap;">
                                <dxe:ASPxSpinEdit ID="spinDivValue" runat="server" Height="21px" Number="1" MaxValue="1000"
                                    MinValue="1" NumberType="Integer" Width="87px">
                                </dxe:ASPxSpinEdit>
                            </td>
                            <td style="white-space: nowrap;">
                                <dxe:ASPxLabel ID="ASPxLabel2" runat="server" Text="(区间值乘1000代表查询返回的数据量)">
                                </dxe:ASPxLabel>
                            </td>
                            <td>
                                <asp:Button Text="XPCollection" OnClientClick="InfoGrid.PerformCallback('Query');return false;" ID="btn1" runat="server" />
                            </td>
                            <td>
                                <asp:Button ID="btn2" runat="server" OnClientClick="CusorGrid.PerformCallback('Query');return false;"
                                    Text="XpoDataSource" />
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="infoGrid">
                    <dxwgv:ASPxGridView ID="InfoGrid" ClientInstanceName="InfoGrid" 
                        KeyFieldName="ID" Width="100%" runat="server"
                        OnCustomCallback="InfoGrid_CustomCallback"
                        OnPreRender="InfoGrid_PreRender" AutoGenerateColumns="False"  >
                        <Columns>
                            <dxwgv:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" >
                                <HeaderTemplate>
                                    <input title="[选择/取消选择]本页所有行" onclick="InfoGrid.SelectAllRowsOnPage(this.checked);"
                                        style="vertical-align: middle;" id="chkPageSelectAll" type="checkbox" />
                                </HeaderTemplate>
                                <HeaderStyle HorizontalAlign="Center" />
                            </dxwgv:GridViewCommandColumn>
                            <dxwgv:GridViewDataTextColumn FieldName="Name"  VisibleIndex="1" >
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn FieldName="Price" VisibleIndex="2">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn FieldName="StoreTime" VisibleIndex="3">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn FieldName="DivValue" VisibleIndex="4">
                            </dxwgv:GridViewDataTextColumn>
                        </Columns>
                        <ClientSideEvents CustomizationWindowCloseUp="function(s, e) { UpdateCustomizationWindowValue(); }" />
                        <Templates>
                            <StatusBar>
                                <asp:Label ID="lblStatusBar" runat="server"></asp:Label>
                            </StatusBar>
                        </Templates>
                   </dxwgv:ASPxGridView>
                </div>
                <div class="infoGrid">
                    <dxwgv:ASPxGridView ID="CusorGrid" runat="server" AutoGenerateColumns="False"
                        ClientInstanceName="CusorGrid" KeyFieldName="ID" OnCustomCallback="CusorGrid_CustomCallback"
                        OnPreRender="CusorGrid_PreRender" DataSourceID="dataSource" Width="100%">
                        <Columns>
                            <dxwgv:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0">
                                <HeaderTemplate>
                                    <input id="chkPageSelectAll" onclick="CusorGrid.SelectAllRowsOnPage(this.checked);"
                                        style="vertical-align: middle;" title="[选择/取消选择]本页所有行" type="checkbox" />
                                </HeaderTemplate>
                                <HeaderStyle HorizontalAlign="Center" />
                            </dxwgv:GridViewCommandColumn>
                            <dxwgv:GridViewDataTextColumn FieldName="Name" VisibleIndex="1">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn FieldName="Price" VisibleIndex="2">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn FieldName="StoreTime" VisibleIndex="3">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn FieldName="DivValue" VisibleIndex="4">
                            </dxwgv:GridViewDataTextColumn>
                        </Columns>
                        <ClientSideEvents CustomizationWindowCloseUp="function(s, e) { UpdateCustomizationWindowValue(); }" />
                        <Templates>
                            <StatusBar>
                                <asp:Label ID="lblStatusBar" runat="server"></asp:Label>
                            </StatusBar>
                        </Templates>
                    </dxwgv:ASPxGridView>
                </div>
            </dxp:PanelContent>
        </PanelCollection>
    </dxcp:ASPxCallbackPanel>
    <dxxpo:XpoDataSource ID="dataSource" runat="server" 
        ServerMode="true" TypeName="OT.Module.Model.Product_MDL" >
    </dxxpo:XpoDataSource>
</asp:Content>

